[]
dashboard.DashboardLiteViewer
• new DashboardLiteViewer()
▸ destroy(): void
释放仪表板标准查看器实例的资源
void
▸ executeCommand(option
): Promise
<void
>
执行仪表板命令
名称 | 类型 |
---|---|
option |
CommandOption |
Promise
<void
>
示例代码
liteViewer.executeCommand({
name: 'DrillDown', // or 'Drill'
payload: {
target: 'column',
drillDimension: 'Region',
}
}).then(() => {
// drill down successfully
}).catch((err) => {
console.log(err);
});
▸ getDatasets(): Promise
<any
[]>
获取所有使用的数据集
Promise
<any
[]>
▸ getUIDashboard(): UIDashboard
获取UIDashboard实例
▸ initialize(initOption
): Promise
<void
>
初始化仪表板标准查看器
名称 | 类型 |
---|---|
initOption |
DashboardLiteViewerInitOption |
Promise
<void
>
示例代码
liteViewer.initialize({
container: document.querySelector("#dashboard"),
defaults: {
dashboardId: 'xxxxxx',
},
features: {
actionbarItems : ["focus","annotation","shareScenario"]
},
onLoaded: (docName) => {
document.title = docName;
}
});
▸ requestFullScreen(): void
切换到全屏模式
void
▸ setParameterValue(parameters
): void
设置当前仪表板的默认参数值
名称 | 类型 |
---|---|
parameters |
Object |
void
示例代码
viewer.setParameterValue({
p1: ['product1'],
p2: [['dd1', '2018'], ['dd2', '2017']]
})